﻿using System.ComponentModel;

namespace Medicalsystem.MCP.FormDesigner.Property
{
    public class MyDataGridColumnProperty
    {
        private MyDataGridColumn _control;

        public MyDataGridColumnProperty(MyDataGridColumn control)
        {
            _control = control;
        }

        [Browsable(false)]
        public MyDataGridColumn Control
        {
            get
            {
                return _control;
            }
        }

        [CategoryAttribute("外观")]
        [Description("获取或设置列标题单元格的标题文本")]
        public string 单元格标题文本
        {
            get
            {
                return _control.HeaderText;
            }
            set
            {
                _control.HeaderText = value;
            }
        }

        [CategoryAttribute("布局")]
        [Description("获取或设置列的当前宽度（以像素为单位）")]
        public int 宽度
        {
            get
            {
                return _control.Width;
            }
            set
            {
                _control.Width = value;
            }
        }

        public override string ToString()
        {
            return this._control.HeaderText;
        }
    }
}